Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@aam
Copy link
Member

@aam aam commented Apr 14, 2018

First commit is just making the code dart2 compilant(so the test can be run with --preview-dart-2).
Second commit replaces polling with listening for service events to wait for when isolate starts, runs and resumes.

Fixes flutter/flutter#16572

@chinmaygarde
Copy link
Member

cc @Hixie

if (params == null) {
return;
}
final Map<String, dynamic> event = params['event'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider factoring out as onServiceEvent(event)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

});
Expect.equals(isolate['type'], 'Isolate');
Expect.isNotNull(isolate['pauseEvent']);
// If it is not runnable, wait until it becomes runnable.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code here is interested in the isolate being paused at start, so it should look for that condition instead of runnable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@rmacnak-google rmacnak-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@aam aam merged commit 98f6c2d into flutter:master Apr 17, 2018
@aam aam deleted the fix-service-test branch April 17, 2018 02:31
tvolkert added a commit that referenced this pull request Apr 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants